require('@/public.js');

Jsborya.ready(function () {


	var app = new Vue({
		el: '#app',
		data: {
			details: {
				desc: "2018-07-15至xxxxx",
				count: "0",
				list: []
			},
			orderId: '',
			type: 1,//1 开卡直接2开卡间接 3开卡管理4 制卡直接5制卡间接 6制卡管理
		},
		created: function () {
			Jsborya.webviewLoading({ isLoad: false });//关闭app加载层
		},
		mounted: function () {
			const vm = this;

			Jsborya.getUserInfo(function (data) {
				vm.userInfo = data;

				vm.orderId = vm.getUrlParam('orderId');
				vm.type = vm.getUrlParam('type');
				vm.getDetails();
			});
		},
		methods: {
			getDetails () {
				const vm = this;

				let json = {
					'params': {
						'orderId': vm.orderId,
						'type': vm.type
					},
					'userInfo': vm.userInfo
				};

				vm.AJAX('/jleas/w/account/openIncomeDetail', json, function (data) {
					vm.details = data.data;
				});
			},
		}
	});


});